package isjinhao.jlox.grammar.expression.represention;

import isjinhao.jlox.grammar.expression.visitor.ExpressionVisitor;
import isjinhao.jlox.lexical.Token;
import lombok.Getter;

/**
 * @Author ISJINHAO
 * @Date 2021/2/27 14:26
 */
@Getter
public class Logic extends Expression {

    private Expression left;
    private Expression right;
    private Token token;

    @Override
    public <R> R accept(ExpressionVisitor<R> expressionVisitor) {
        return expressionVisitor.visitLogicExpr(this);
    }

    public Logic(Expression left, Token token, Expression right) {
        this.left = left;
        this.token = token;
        this.right = right;
    }
}
